import os

from setuptools import setup
from torch.utils.cpp_extension import BuildExtension, CppExtension

os.environ["DISTUTILS_USE_SDK"] = "1"


setup(
    package_dir={"": "src"},
    ext_modules=[
        CppExtension(
            name="my_reduce",
            sources=["_C.cpp"],
            extra_compile_args=["/std=c++17"],
            # extra_compile_args=["-g"],
            # extra_link_args=["-Wl,--no-as-needed", "-lm"],
        )
    ],
    cmdclass={
        "build_ext": BuildExtension,
    },
)
